package com.nirvana.admin.controller;

import com.nirvana.admin.entity.SysMenu;
import com.nirvana.admin.service.SysMenuService;
import com.nirvana.common.controller.BizController;
import com.nirvana.common.dto.BaseResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 菜单权限表 前端控制器
 * </p>
 *
 * @author zhangshuaiyin
 * @since 2021-09-29
 */
@Api(tags = "菜单权限表")
@RestController
@RequestMapping("/system/menus")
public class SysMenuController extends BizController<SysMenu, SysMenuService> {
    @Resource
    private SysMenuService sysMenuService;

    @ApiOperation(value = "查询列表")
    @GetMapping("/list")
    public BaseResponse<List<?>> list() {
        return BaseResponse.ok(sysMenuService.findList());
    }
}

